Chapter 2 Kinetic EFM Configuration

Prerequisites

Ensure you have completed all the steps in the following documents before continuing:


Allow the Local Broker to Connect Upstream

  1. Open the remote broker EFM System Administrator web interface at https://R_BROKER_IP:8443/efm-admin (replacing R_BROKER_IP with your remote broker’s public IP address) and log in as the efmAdmin user with the password that was set during installation (kinetic123)

It is safe to ignore the SSL warning since this lab uses self-signed SSL certificates. In production the EFM server would be provisioned with a valid SSL certificate.


Once you log in, the “radiation”-style warning in the upper right-hand of the page indicates that there are downstream brokers in quarantine.

  1. Navigate to Permissions > Quarantine > Authorize
  2. Select the local broker from the list and click the Authorize button at the bottom

You should now see the local broker l-broker listed underneath the Root Broker in the Brokers section on the left-hand of the page.

  1. Select l-broker from the Brokers section


Add DSLinks to the Local Broker

MQTT DSLink

  1. Navigate to Management > links > Install Link
  2. Select MQTT from the link dropdown
  3. Enter mqtt as the name and click Invoke

It should say success True if the operation was successful.

  1. Navigate to Management > links > mqtt > Start Link
  2. Click Invoke


Configure Local Broker DSLinks

MQTT

  1. Open the remote broker EFM Dataflow Editor web interface at https://R_BROKER_IP:8443/dataflow.html (replacing R_BROKER_IP with your remote broker’s public IP address) and log in again as the efmAdmin user, if prompted
  2. Navigate to Data > downstream > l-broker > downstream > mqtt
  3. Under Metrics right-click on Broker Enabled: false, set the value to true, and click Invoke

  1. Right-click on mqtt and select Add Server
  2. Use the following options:

You don’t need to delete the example placeholder url of tcp://test.mosquitto.org/. Just start typing in that field with the correct value and it will replace that setting. You will run into this with other EFM configuration dialogs as well.


You should see your station’s Raspberry Pi status LEDs turn from red to green after enabling the MQTT server on the local broker.

  1. Expand ... > mqtt > local-broker > Subscriptions

This ... > convention means to stay where you were in the Data section, but to dive deeper into the hierarchy. It saves rewriting the entire path when you are not changing your broker focus. In this case, the ... means Data > downstream > l-broker > downstream

  1. Right-click on Subscriptions and select Subscribe
  2. Use the following options:

  1. Subscribe to another MQTT channel with the following options:

The active MQTT channel subscriptions will show up under the Metrics section.

  1. Select ... > l-broker > downstream > dataflow
  2. Right-click on dataflow and select Create Dataflow
  3. Name the dataflow clear-local-mqtt-logs and click Invoke

  1. Expand ... > dataflow > clear-local-mqtt-logs
  2. Open the clear-local-mqtt-logs dataflow in the right-hand editor workspace by clicking on its dataflow icon

  1. Expand ... > l-broker > sys > links > mqtt
  2. Right-click on mqtt, navigate to Log, and then drag Clear to the editor workspace Dataflow section

It may not be obvious exactly how to perform this step. You will left-click and hold the Clear menu entry, drag it to the editor workspace, and then let go of the left mouse or touchpad button.

This is a process you will become very familiar with: dragging various functional “blocks” to the editor workspace to build a dataflow, editing their properties, and connecting their inputs and outputs. This is essentially graphical programming and as you will see can perform fairly complex logic and data operations.

  1. Double-click on the new block and rename clear_log to clear-mqtt-log
  2. Edit the following values in the right-hand Properties section:

As you likely have already figured out, this clear-local-mqtt-logs dataflow will clear the MQTT log every 10 minutes. Without this in place the default MQTT DSLink log level would eventually fill up the small amount of storage with embedded platforms like the IR829. This isn’t as much of a concern with our UCS-based installation, but is a good example of how even the built-in capabilities of EFM can be leveraged and extended via custom dataflows.


You can see this log in the EFM System Administrator web interface under the Life cycle section for the l-broker broker’s mqtt link.

  1. Close the clear-local-mqtt-logs dataflow by clicking the x icon next to its name above the editor workspace


On to Chapter 3 Local Kinetic EFM Dataflows

left-chevronright-chevron